In the equipment controlled by a remote control, functions which are required on the receiving end that receives a remote control signal outputted from a transmitter are a receiving function of correctly demodulating the remote control signal into data, and a decoding function of decoding the demodulated data to obtain information of the request.
Initially, a remote control signal that is outputted from a remote control is described with reference to FIGS. 21 and 22. FIGS. 21(a) and 21(b) are diagrams showing examples of a remote control signal that is outputted from a remote control.
As shown in FIG. 21(a), a remote control signal described herein is composed of a header part indicating that it is followed by a remote control signal, a data part that represents a bit string of data indicating a depressed remote control button with combination of duration of Low (hereinafter, referred to as “LongLow”) and duration of High (hereinafter, referred to as “LongHigh”) in the remote control signal, and a trailer part notifying the end of the data.
In FIG. 21(a), a portion of the signal in which a duty between LongLow and LongHigh in the data part is 1:1 corresponds to data “0”, while a portion in which the duty is 1:3 corresponds to data “1”. It is assumed that there are data patterns at least as many as the number of remote control buttons.
As the transmitters that output the remote control signal, there are two kinds of transmitters that output remote control signals as shown in FIGS. 22(a) and 22(b), respectively. The first one is a repeat-header type transmitter as shown in FIG. 22(a) which, when the same remote control button is continuously depressed, outputs a waveform including a data part as shown in FIG. 21(a) only at the first time, and thereafter outputs a waveform as shown in FIG. 21(b), which is composed of a repeat header part and a trailer part, without including a data part, as long as the same remote control button is continuously depressed. The second one is a repeated-data type transmitter as shown in FIG. 22(b), which repeatedly outputs a waveform including a data part as shown in FIG. 21(a) while the remote control button is depressed.
Then, descriptions will be given of the decoding function and the receiving function which are required at the receiving end that receives the remoter control signal.
Since the decoding function requires a flexible correspondence between the demodulated data and the information of the request, it is desirable that the decoding function should be implemented by a CPU. On the other hand, the receiving function on the receiving end is conventionally implemented by one of following two methods.
In one of the methods, a remote control signal that is outputted from a transmitter is directly inputted into a CPU on the receiving end, then edges of the remote control are utilized as interrupt triggers, and the interval of the interrupts is counted by a timer (not shown) included in the CPU, whereby the receiving function is implemented by the CPU.
However, when this first method is employed, the CPU carries out all processes for determining the remote control signal, such as detection of a header part, 0/1 determination for data, and detection of trailer parts, and consequently, the CPU must perform quite complicated software processing, whereby the number of program steps in the CPU is unfavorably increased.
Further, in this first method, as the edges of the remote control signal are handled directly as interrupt signals for the CPU, the interrupts resulting from the remote control signal occur quite frequently at the depression of the remote control button. These interrupts resulting from the remote control signal have strict real-time requirements and must be assigned a higher priority than the other interrupts, because the interval of interrupts occurring in the CPU must be correctly counted by the timer, to determine the remote control signal. Therefore, when the first method is employed, the interrupts having higher priorities occur quite frequently in the CPU, and accordingly, the processing for a system that is to be controlled by the CPU may be oppressed, so that the operation may be delayed.
Accordingly, a second method for implementing the remote control signal receiving function has been conventionally employed. In this second method, a remote control receiving circuit for receiving an inputted remote control signal and performing part or all of the demodulation process such as the detection of a header part or the detection of a data part, is provided on the receiving end that receives the remote control signal, thereby to reduce the number of occurrences of the interrupts resulting from the remote control signal and lighten the processing loads on the CPU (see Japanese Published Patent Application No. Hei. 5-328451, No. Hei. 11-53091, and U.S. Pat. No. 5,752,184).
Hereinafter, a remote control receiving system that implements the remote control signal receiving function according to the second method, i.e., by using a remote control receiving circuit will be described with reference to FIGS. 23 and 24. It is assumed that remote control signals as shown in FIG. 21 are inputted to the remote control receiving circuit.
Initially, a construction of a conventional remote control receiving system at the receiving end will be described with reference to FIG. 23. FIG. 23 is a diagram illustrating the construction of a conventional remote control receiving system.
In FIG. 23, the conventional remote control receiving system is constituted by a remote control receiving circuit 500 that receives a remote control signal transmitted from a transmitter (not shown), and a CPU 590 that controls the remote control receiving circuit 500 and decodes the remote control signal. The remote control receiving circuit 500 comprises an edge detection circuit 510 that detects edges of the received remote control signal, a counter circuit 520 that counts the interval of the edges which are detected by the edge detection circuit 510, a header detection circuit 530 that receives the output from the counter circuit 520 and detects an header part in the remote control signal, a header interrupt generation circuit 560 that generates a header interrupt signal S560 notifying the CPU 590 that the header part of the remote control signal is detected, a data determination circuit 540 that determines 0/1 of a data part following the header part in the remote control signal on the basis of the output from the counter circuit 520 and stores the data in an internal register 550, a data interrupt generation circuit 570 that generates a data interrupt signal S570 notifying the CPU 590 that the data part of the remote control signal is detected, when data as much as the number of bits corresponding to the data part in the remote control signal are stored in the internal register 550, and a trailer detection circuit 580 that receives the output from the counter circuit 520, then detects a trailer part in the remote control signal, and notifies the CPU 590 that the trailer part of the remote control signal is detected. Here, the remote control receiving circuit 500 does not have to include all of the above-mentioned circuits, but may be constituted by a part of the aforementioned remote control receiving circuit, including the edge detection circuit 510, the counter circuit 520, and the data determination circuit 540. For example, the remote control receiving circuit 500 may be constituted by the edge detection circuit 510, the counter circuit 520, the data determination circuit 540, and the data interrupt generation circuit 570.
The CPU 590 receives the interrupt signals S560 to S580 which are outputted from the above-mentioned remote control receiving circuit 500, and performs control in accordance with the received interrupt signals. As one interrupt port is employed for one interrupt signal, the CPU 590 includes three interrupt ports 0, 1 and 2 in FIG. 23.
Next, the flow of processing in a case where the conventional remote control receiving system that has the above-mentioned construction receives a remote control signal will be described with reference to FIG. 24. FIG. 24 is a flowchart showing a sequence of operations when the conventional remote control receiving system receives a remote control signal.
When the operation of the remote control receiving circuit is started, the counter circuit 520 and the data determination circuit 540 are first initialized (F2401). While the edge detection circuit 510 does not detect an edge of the remote control signal, the counter circuit 520 continues incrementing (F2402).
When the edge detection circuit 510 detects an edge, the value of the counter circuit 520 at the edge detection is outputted to the header detection circuit 530, the trailer detection circuit 580 and the data determination circuit 540, respectively, and actions according to the value of the counter circuit 520 occur in the respective circuits.
When the counter value is a value indicating a header detection (F2404), the header detection circuit 530 detects the header part, then the header interrupt generation circuit 560 generates a header interrupt signal S560, and header interrupt is outputted to the interrupt port 0 of the CPU 590 (F2405). Thereafter, the counter circuit 520 is initialized (F2406), and waits for the next edge.
When the counter value is a value indicating a data detection (F2407), the data determination circuit 540 determines 0 or 1 of the remote control signal on the basis of the output from the counter circuit 520, and stores the determined data in the internal register 550 (F2408). When data as much as a prescribed number of bits corresponding to the data part have been stored in the internal register 550 (F2409), the data interrupt generation circuit 570 generates a data interrupt signal S570, to issue the data interrupt to the interrupt port 1 of the CPU 590 (F2410). Thereafter, the counter circuit 520 is initialized (F2406). When data as much as the prescribed number of bits have not been stored in the internal register 550 (F2409), the counter circuit 520 is initialized, without the data interrupt signal S570 generated by the data interrupt generation circuit 570 (F2406).
When the counter value is a value indicating a trailer detection (F2411), the trailer detection circuit 580 detects the trailer part of the remote control signal and generates a trailer interrupt signal S580 to be outputted to the interrupt port 2 of the CPU 590 (F2412), and thereafter the counter circuit 520 is initialized (F2406) and waits for the next edge.
However, when the remote control signal receiving function is implemented according to the second method, i.e., by using the above-mentioned conventional remote control receiving circuit 500, following problems occur.
First of all, since the conventional remote control receiving circuit 500 includes the header interrupt generation circuit 560, the trailer detection circuit 580, and the data interrupt generation circuit 570 as shown in FIG. 23, and thus the interrupt signals are outputted from the respective circuits to the CPU 590, the CPU 590 needs to have interrupt ports corresponding to the respective interrupt signals. Therefore, many resources of the CPU 590 are unfavorably expended. In order to overcome this problem, the conventional remote control receiving circuit 500 can be constituted, for example, only by the edge detection circuit 510, the counter circuit 520 and the data determination circuit 540, but in this case the remote control receiving circuit cannot generate the header interrupt. Accordingly, when the remote control receiving circuit 500 receives a remote control signal that is outputted from a repeat-header type transmitter as shown in FIG. 22(a), this circuit cannot notify the CPU 590 that the remote control button is continuously depressed, whereby specifications of the remote control signal, which are available in the remote control receiving system are undesirably narrowed.
Secondly, in the conventional remote control receiving circuit 500, following harmful effects may be caused by disturbance of the remote control signal due to noises or the like.
The first case is when a waveform that is identified as a header part is generated by noises.
More specifically, even when a remote control signal that is composed only of a repeat-header part, including no data as shown in FIG. 21(b) is detected by the conventional remote control receiving circuit 500 at an impossible timing (such as immediately after start of the remote control operation), the header interrupt generation circuit 560 in the conventional remote control receiving circuit 500 unfavorably generates the header interrupt signal S560, and outputs the header interrupt to the CPU 590. As the header interrupt that is erroneously issued due to noises causes malfunction of the CPU, the CPU 590 must have a code for avoiding the malfunction.
The second case is when a waveform that is identified as a trailer part is generated by noises.
To be more specific, also when the waveform of the remote control signal that is outputted from the transmitter is interrupted due to some disturbance (for example in a situation where a person crosses in front of the transmitter) while the remote control button is depressed, the conventional remote control receiving circuit 500 receives the same waveform as a trailer waveform, and then the trailer detection circuit 580 generates the trailer interrupt signal S580, whereby the trailer interrupt is unfavorably issued to the CPU 590. In the conventional remote control receiving system, the trailer interrupt signal S580 is employed as an interrupt representing a completion of the receiving of the remote control signal, and thus when the trailer interrupt signal is erroneously issued, the CPU 590 may malfunction. Therefore, also for the trailer interrupt signal S580, the CPU 590 must have a code for avoiding the malfunction.
The third case is when data more than the prescribed number of bits are detected due to noises.
More specifically, at the end of the data detection for a data part of the remote control signal, the remote control receiving circuit 500 may receive a waveform that is erroneously identified as data due to noises that occur after waveforms as many as the number of bits which are to be received are received (for example, noises resulting from release of the remote control button). In the conventional remote control receiving circuit 500, the erroneously detected bits are written as data in the internal register 550, even after the data interrupt signal S570 is issued, and thus the data as much as the specified number of bits which have been stored before the issuance of the data interrupt signal S570 may be destroyed. To avoid this, the CPU 590 must read the data stored in the internal register 550 promptly after the data interrupt signal S570 is issued and before the data written in the internal register 550 are destroyed due to the noises. Therefore, the CPU 590 must give a higher priority to the data interrupt, thereby to quickly perform reading of the data after occurrence of the data interrupt.